package restructure;

import java.util.Enumeration;
import java.util.Vector;

/**
 * @Description
 * @Date 2021/9/17
 * @Created by Jonathan
 */
public class TestVectorAPI {
    public static void main(String[] args) {
        Vector<Integer> vector = new Vector<>();
        vector.add(1);
        vector.add(2);
        vector.add(3);
        vector.add(4);
        Enumeration<Integer> elements = vector.elements();
        while (elements.hasMoreElements()) {
            Integer element = elements.nextElement();
            System.out.println("element:" + element);
        }
    }
}
